golang check if key is in map

193

golang check if key is in map -

if val, ok := dict["foo"]; ok {
    //do something here
}

Comments

Submit
0 Comments